#define user_layout()
#set(uploadPah='/bookmall/upload/')
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">

    <title>#(title)</title>

    <!-- Bootstrap core CSS -->
    <link href="#(ctx)/third/bootstrap/bootstrap.min.css" rel="stylesheet">
 	<link href="#(ctx)/third/bootstrap/bootstrap-theme.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="#(ctx)/css/dashboard.css" rel="stylesheet">
	#@css?()
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#(ctx)">书界商城</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#(ctx)/user">欢迎您，#(session.session_user.name)</a></li>
            <li><a href="#">修改密码</a></li>
            <li><a href="#(ctx)/user/logout">退出登录</a></li>
          </ul>
        </div>
      </div>
    </nav>

<div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
        #if(session.session_user.type == 0)
          <ul class="nav nav-sidebar">
            <li class="#(menu == 'order' ? 'active':'')"><a href="#(ctx)/order/list">我的订单<span class="sr-only">(current)</span></a></li>
            <li class="#(menu == 'secondtrade' ? 'active':'')"><a href="#(ctx)/trade/soldlist">二手书单</a></li>
            <li class="#(menu == 'exchangetrade' ? 'active':'')"><a href="#(ctx)/trade/exchangelist">换书单</a></li>
            <li class="#(menu == 'mycomments' ? 'active':'')"><a href="#(ctx)/comments/mine">我的书评</a></li>
            <li class="#(menu == 'userinfo' ? 'active':'')"><a href="#(ctx)/user/userinfo">个人信息</a></li>
          </ul>
         #else 
           <ul class="nav nav-sidebar">
            <li class="#(menu == 'useraudit' ? 'active':'')"><a href="#(ctx)/user/audit">注册用户审核</a></li>
            <li class="#(menu == 'order' ? 'active':'')"><a href="#(ctx)/order/list">订单管理<span class="sr-only">(current)</span></a></li>
            <li class="#(menu == 'book' ? 'active':'')"><a href="#(ctx)/book/list">图书管理<span class="sr-only">(current)</span></a></li>
            <li class="#(menu == 'secondaudit' ? 'active':'')"><a href="#(ctx)/trade/secondaudit">二手书交易审核</a></li>
            <li class="#(menu == 'exchangeaudit' ? 'active':'')"><a href="#(ctx)/trade/exchangeaudit">换书交易审核</a></li>
            <li class="#(menu == 'commentsaudit' ? 'active':'')"><a href="#(ctx)/comments/auditList">书评审核</a></li>
            <li class="#(menu == 'userinfo' ? 'active':'')"><a href="#(ctx)/user/userinfo">个人信息</a></li>
          </ul>
         #end 
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          #@user_main()
          <div style="margin-top: 30px;">				<footer>
		        <p class="pull-right"><a href="#">返回顶部</a></p>
		        <p>&copy; 2017 书界商城版权所有.</p>
		      </footer>
		  </div>
        </div>
      </div>
    </div>
    
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="#(ctx)/third/jquery/jquery.min.js"></script>
    <script src="#(ctx)/third/bootstrap/bootstrap.min.js"></script>
    <script src="#(ctx)/js/common.js"></script>
    #if(session.session_user.type == 0)
    	<script src="#(ctx)/js/user.js"></script>
    #else 
    <script src="#(ctx)/js/admin.js"></script>
    #end
    
    #@js?()
  </body>
</html>
#end